import java.util.Scanner;
import java.util.InputMismatchException;
public class text4 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入被除数：");
        int dividend = in.nextInt();
        System.out.println("请输入除数：");
        int divisor = in.nextInt();
        try {
            int result = dividend / divisor;
            System.out.println("商为：" + result);
        } catch (ArithmeticException e) {
            System.out.println("请输入不为0的数字！");
        } catch (InputMismatchException e) {
            System.out.println("请输入数字！");
        } finally {
            System.out.println("谢谢！");
        }
    }
}
